Add Temporal Nexus Operation Handler#2842
Open
Quinn-With-Two-Ns wants to merge 7 commits intotemporalio:masterfrom
Open
Add Temporal Nexus Operation Handler#2842Quinn-With-Two-Ns wants to merge 7 commits intotemporalio:masterfrom
Quinn-With-Two-Ns wants to merge 7 commits intotemporalio:masterfrom
Conversation
| TestMultiArgWorkflowFunctions.TestNoArgsWorkflowProc.class, | ||
| wf -> { | ||
| wf.proc(); | ||
| return null; |
Contributor
Author
There was a problem hiding this comment.
@maciejdudko @GregoryTravis This is one issue I found with the approach, due to ambiguity in the lambda we have to return null here for workflows that don't return anything.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Reviewed by Cursor Bugbot for commit ee62ae7. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Add TemporalOperationHandler for generic Nexus operations
Summary
Test plan
Note
Medium Risk
Touches Nexus start/cancel dispatch and operation-token parsing/validation, which can affect interoperability and cancellation semantics. Changes are largely additive/experimental but include refactors on the workflow-start path.
Overview
Adds an experimental generic Nexus handler API:
TemporalOperationHandlerdispatches start/cancel requests to user-provided logic and returns either sync results (TemporalOperationResult.sync) or async workflow-run tokens (TemporalOperationResult.async) via a newTemporalNexusClientwrapper for typed/untyped workflow starts.Refactors shared start-workflow/link-attachment behavior into
NexusStartWorkflowHelperand reuses it fromWorkflowRunOperationImpl, and generalizes token handling by renamingWorkflowRunOperationTokentoOperationTokenplus addingOperationTokenUtil.loadOperationTokenfor type-based cancel dispatch.Adds coverage for the new generic handler behaviors (typed starts, void procs, untyped starts, sync results, cancel path, and guard against multiple async starts per invocation) and updates existing async operation/token tests accordingly.
Reviewed by Cursor Bugbot for commit a33ff01. Bugbot is set up for automated code reviews on this repo. Configure here.